package y23.Nov;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;

public class Test3 {
    public static void main(String[] args){
        try(InputStream inputStream = new FileInputStream("hello.txt")){
            StringBuffer str = new StringBuffer();
            while(true){
                byte[] b = new byte[100];
                int n = inputStream.read(b);
                if (n == -1){
                    break;
                }
                for (int i = 0; i < n; i++) {
                    System.out.printf("%x",b[i]);
                }
            }

        } catch (IOException e) {
            throw new RuntimeException(e);
        }


    }
}
